import service from '@/utils/request'
// import qs from 'qs'
// eslint-disable-next-line no-unused-vars
const { httpPostForm, httpPost, httpGet } = service

const request = {
    //==================================外包商奖惩======================================
    //新增外包方奖励或惩罚
    AddSubcontractorRAP (params) {
        return httpPost({
            url: '/outer/rewardsorpunishment/create',
            params
        })
    },
    //根据唯一id删除外包方奖励或惩罚
    DelSubcontractorRAP (params) {
        return httpGet({
            url: '/outer/rewardsorpunishment/delete',
            params
        })
    },
    //根据唯一id查询外包方奖励或惩罚信息
    GetSubcontractorRAP (params) {
        return httpGet({
            url: '/outer/rewardsorpunishment/findById',
            params
        })
    },
    //根据唯一id查询外包方奖励或惩罚信息
    UpdateSubcontractorRAP (params) {
        return httpPost({
            url: '/outer/rewardsorpunishment/update',
            params
        })
    },
    //修改信用评价明细
    updateCreditTemplate (params) {
        return httpPost({
            url: '/outer/creditratingtemplate/create/dtl',
            params
        })
    },
    //根据id获取信用评价明细
    getCreditTemplate (params) {
        return httpGet({
            url: '/outer/creditratingtemplate/findByIdDtl',
            params,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    //新增外包方解除处罚
    liftingPunishmentAdd (params) {
        return httpPost({
            url: '/outer/removalpunishment/create',
            params
        })
    },
    //修改外包方解除处罚
    liftingPunishmentUpdate (params) {
        return httpPost({
            url: '/outer/removalpunishment/update',
            params
        })
    },
    //外包方解除处罚初始化信息
    liftingPunishmentInitialization (params) {
        return httpGet({
            url: '/outer/removalpunishment/initialization',
            params
        })
    },
    //根据唯一id查询外包方解除处罚信息
    liftingPunishmentfindByid (params) {
        return httpGet({
            url: '/outer/removalpunishment/findById',
            params
        })
    },
    //根据信用代码查询
    getCreditCodeFindByid (params) {
        return httpGet({
            url: '/outer/removalpunishment/find/by/creditCode',
            params
        })
    },
    //初始化
    getinitializationFindByid (params) {
        return httpGet({
            url: '/outer/removalpunishment/initialization',
            params
        })
    },
    //==================================分包商季度评价======================================
    //新增季度评价
    subcontractorEvaluateAdd (params) {
        return httpPost({
            url: '/outer/quarter/evaluate/add',
            params
        })
    },
    //修改季度评价
    subcontractorEvaluateUpdate (params) {
        return httpPost({
            url: '/outer/quarter/evaluate/update',
            params
        })
    },
    //获取季度评价
    subcontractorEvaluateGet (params) {
        return httpGet({
            url: '/outer/quarter/evaluate/get/by/id',
            params,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    //新增季度评价明细
    subcontractorEvaluateDetailsAdd (params) {
        return httpPost({
            url: '/outer/quarter/evaluate/add/dtl',
            params
        })
    },
    //获取季度评价明细
    subcontractorEvaluateDetailsUpdate (params) {
        return httpGet({
            url: '/outer/quarter/evaluate/get/dtl',
            params
        })
    },
    //分包商年度信用评价表
    annualCreditEvaluationForm (params) {
        return httpPost({
            url: '/outer/quarter/evaluate/subcontractor/summary/evaluate',
            params
        })
    },
    //==================================供应商年度评价======================================
    //新增年度评价
    annualEvaluationAdd (params) {
        return httpPost({
            url: '/outer/year/evaluate/add',
            params
        })
    },
    //修改年度评价
    annualEvaluationUpdate (params) {
        alert(params)
        return httpPost({
            url: '/outer/year/evaluate/update',
            params
        })
    },
    //获取年度评价
    annualEvaluationGet (params) {
        return httpGet({
            url: '/outer/year/evaluate/get/by/id',
            params,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    //保存年度评价
    AddannualEvaluationDetailed (params) {
        return httpPost({
            url: '/outer/year/evaluate/add/dtl',
            params
        })
    },
    //获取年度评价明细
    getannualEvaluationDetailed (params) {
        return httpGet({
            url: '/outer/year/evaluate/get/dtl',
            params,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    //供应商合同弹窗(supplierId)
    getContractPopup (params) {
        return httpGet({
            url: '/outer/year/evaluate/sup/getContractBySupplierId',
            params,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    //==================================供应商动态评价======================================
    //创建动态评价
    dynamicEvaluationAdd (params) {
        return httpPost({
            url: '/outer/dynamic/evaluate/create',
            params
        })
    },
    //查询动态评价
    getDynamicEvaluation (params) {
        return httpGet({
            url: '/outer/dynamic/evaluate/list',
            params,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })

    },
}

export default request